package com.kmt.plaza.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import javax.persistence.*;

public class User {
    /**
     * 用户id
     */
    @Id
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 用户名
     */
    @Column(name = "username")
    private String userName;

    /**
     * 密码
     */
    @Column(name = "password")
    private String passWord;

    /**
     * 昵称
     */
    @Column(name = "nickname")
    private String nickName;

    /**
     * 真实姓名
     */
    @Column(name = "realname")
    private String realName;

    @Column(name = "user_img")
    private String userImg;

    /**
     * 手机号
     */
    @Column(name = "user_mobile")
    private String userMobile;

    /**
     * 邮箱
     */
    @Column(name = "user_email")
    private String userEmail;

    /**
     * 性别 M(男) or F(女)
     */
    @Column(name = "user_sex")
    private String userSex;

    private Integer status;

    /**
     * 生日
     */
    @Column(name = "user_birth")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date userBirth;

    /**
     * 创建时间
     */
    @Column(name = "user_regtime")
    private Date userRegtime;

    /**
     * 更新时间
     */
    @Column(name = "user_modtime")
    private Date userModtime;

    public User(Integer userId, String userName, String passWord, String nickName, String realName, String userImg, String userMobile, String userEmail, String userSex, Integer status, Date userBirth, Date userRegtime, Date userModtime) {
        this.userId = userId;
        this.userName = userName;
        this.passWord = passWord;
        this.nickName = nickName;
        this.realName = realName;
        this.userImg = userImg;
        this.userMobile = userMobile;
        this.userEmail = userEmail;
        this.userSex = userSex;
        this.status = status;
        this.userBirth = userBirth;
        this.userRegtime = userRegtime;
        this.userModtime = userModtime;
    }

    public User() {

    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getUserImg() {
        return userImg;
    }

    public void setUserImg(String userImg) {
        this.userImg = userImg;
    }

    public String getUserMobile() {
        return userMobile;
    }

    public void setUserMobile(String userMobile) {
        this.userMobile = userMobile;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserSex() {
        return userSex;
    }

    public void setUserSex(String userSex) {
        this.userSex = userSex;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getUserBirth() {
        return userBirth;
    }

    public void setUserBirth(Date userBirth) {
        this.userBirth = userBirth;
    }

    public Date getUserRegtime() {
        return userRegtime;
    }

    public void setUserRegtime(Date userRegtime) {
        this.userRegtime = userRegtime;
    }

    public Date getUserModtime() {
        return userModtime;
    }

    public void setUserModtime(Date userModtime) {
        this.userModtime = userModtime;
    }
}